package world.ztomorrow.common.exception;


import lombok.Data;
import lombok.EqualsAndHashCode;
import world.ztomorrow.common.constant.ErrorCodeEnum;

@EqualsAndHashCode(callSuper = true)
@Data
public class BusinessException extends RuntimeException {

    private final ErrorCodeEnum errorCodeEnum;

    public BusinessException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMessage(), null, false, false);
        this.errorCodeEnum = errorCodeEnum;
    }

}